package com.zq.zqmanager.service;

import com.zq.zqmanager.dao.UserDAO;
import com.zq.zqmanager.entity.User;
import com.zq.zqmanager.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @program: zqmanager
 * @Date: 2020/2/25 21:15
 * @Author: zhengqiang
 * @Description:
 */
@Service
public class UserService implements UserDAO {

    @Resource
    private UserMapper userMapper;

    @Override
    public List<User> getAll() {
        return userMapper.selectAll();
    }

    @Override
    public User selectByUserName(String username) {
        return userMapper.selectByUsername(username);
    }
}
